package com.kgc.fk.service.impl;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.collection.pojo.CostThingPojo;
import com.kgc.fk.dao.CostThingDao;
import com.kgc.fk.service.CostThingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CostThingServiceImpl implements CostThingService {
    private Logger logger = LoggerFactory.getLogger(CostThingServiceImpl.class);

    @Resource
    private CostThingDao costThingDao;


    @Override
    public ResponseMsg getALlCostThing() {
        logger.info("getALlCostThing start ....");
        ResponseMsg responseMsg = new ResponseMsg();
        responseMsg.setCode("201");
        List<CostThingPojo> list = costThingDao.getCostThings();
        responseMsg.setData(list);
        logger.info("getALlCostThing end .... responseMsg{}", responseMsg);
        return responseMsg;
    }
}
